package com.ganbo.service;

import com.sign.server.SignatureServerApplication;
import com.sign.server.entity.User;
import com.sign.server.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * Created by gan on 2019/6/12 22:10.
 */

@RunWith(SpringRunner.class)
@SpringBootTest(classes = SignatureServerApplication.class)
public class service {

    @Autowired
    private UserService userService;

    @Test
    public void insertUser() {

        for (int i = 0; i < 10; i++) {
            User user = new User();
            user.setAge(10 + i);
            user.setEmail(i + "923099645@qq.com");
            user.setName("bruce" + i);
            userService.save(user);
        }
    }

}
